package com.dt.dubai.mech.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;

import java.util.Date;

/*
 * 商户优惠券记录表
 */

@Data
@Table(name = "dt_mech_marketing_coupon")
@EqualsAndHashCode(callSuper = false)
public class MechMarketingCouponEntity extends BaseEntity {

    //商户登录记录ID
    @NotNull(message = "adminLoginRecordId参数不能为空")
    Long adminLoginRecordId;

    //类型 1-电商,2-检测,3-计量
    Short commodityType;

    //优惠券发行类型 1-领取,2-赠送,3-推送
    Short couponPublishType;

    //优惠券名称
    @Length(min = 0, max = 100, message = "couponName参数最大长度不100")
    String couponName;

    //发行量
    Integer publishNum;

    //发行价
    Integer publishPrice;

    //优惠券规则
    @Length(min = 0, max = 500, message = "couponRuleJson参数最大长度不500")
    String couponRuleJson;

    //使用范围
    @Length(min = 0, max = 500, message = "scopeUseJson参数最大长度不500")
    String scopeUseJson;

    //商品记录id
    @NotNull(message = "retailCommodityRecordId参数不能为空")
    Long retailCommodityRecordId;

    //商品销售属性
    @Length(min = 0, max = 1000, message = "commodityInfoJson参数最大长度不1000")
    String commodityInfoJson;

    //开始使用时间
    Date startUseTime;

    //结束使用时间
    Date endUseTime;


}
